package com.wk.filter;

import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebFilter(urlPatterns = { "/restful/*" })
public class UserSessionFilter implements Filter {

	//private static Logger logger = Logger.getLogger(UserSessionFilter.class);
	
	//private static final List<String> WHITE_LIST = new ArrayList<String>();
	
	//private WebApplicationContext wac;

    //private final static CacheFacade cacheFacade = CacheFacade.getInstance();

    
    
	@Override
	public void destroy() {
	    
	}

	@Override
	public void doFilter(final ServletRequest req, final ServletResponse resp, final FilterChain chain) throws IOException,
	ServletException {
 		final HttpServletRequest request = (HttpServletRequest) req;
		final HttpServletResponse response = (HttpServletResponse) resp;
		chain.doFilter(request, response);
		System.out.println(request.getRequestURI());
	}

	@Override
	public void init(final FilterConfig config) throws ServletException {
		
	}
	
}